package org.example.MedicalCrowdsourcing.repository;

import org.example.MedicalCrowdsourcing.model.entity.LoginRecord;
import org.example.MedicalCrowdsourcing.model.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LoginRecordRepository extends JpaRepository<LoginRecord, Long> {
    List<LoginRecord> findByUserOrderByLoginTimeDesc(User user);
    List<LoginRecord> findTop10ByUserOrderByLoginTimeDesc(User user);
} 